﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>google</title>
    <link href="css/jquery.autocomplete.css" rel="stylesheet" type="text/css" />

    <script  src="js/jquery.js" type="text/javascript"></script>

    <script type='text/javascript'  src="js/jquery.autocomplete.js"></script>

    <script type="text/javascript">  
        function findValue(li){    
            if( li == null ) return alert("No match!");    
            if( !!li.extra ) 
            var sValue = li.extra[0];  
        }
        function selectItem(li){    
            findValue(li);
        }
        function lookupLocal(){    
            var oSuggest = $(".ajaxinput")[0].autocompleter;    
            oSuggest.findValue();    
            return false;
        }
        $(document).ready(function(){
            $("#ac_me").autocomplete("Ajax/AutoCompleteData.aspx",{
                delay:10,
                minChars:1,
                matchSubset:1,
                cacheLength:1,
                onItemSelect:selectItem,
                onFindValue: findValue,
                autoFill:false,
                maxItemsToShow:20
            });  
        });    
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input id="ac_me" type="text" />
    </div>
    </form>
</body>
</html>
